package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.sql.Timestamp;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 监测值表，用于记录每一个监测项可能存在的监测值项，每一个监测项可以有一个或者多个监测值
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="MonitorValue对象", description="监测值表，用于记录每一个监测项可能存在的监测值项，每一个监测项可以有一个或者多个监测值")
public class MonitorValue extends Model<MonitorValue> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "监测值名称")
    private String name;

    @ApiModelProperty(value = "监测值编码")
    private String code;

    @ApiModelProperty(value = "监测值当前等级阈值或阈值表达式")
    private String threshold;

    @ApiModelProperty(value = "是否告警")
    private Boolean warned;

    @ApiModelProperty(value = "当前告警等级，关联字典条目表")
    private String warnLevel;

    @ApiModelProperty(value = "当前告警类型，关联字典条目表")
    private String warnType;

    @ApiModelProperty(value = "告警产出内容")
    private String warnContext;

    @ApiModelProperty(value = "用于限定可能存在的解析使用解析器版本")
    private Integer version;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;

    @ApiModelProperty(value = "记录更新时间")
    private Timestamp updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
